package org.springblade.demo2.feign;

import lombok.AllArgsConstructor;
import org.springblade.core.tool.api.R;
import org.springblade.demo2.entity.Blog;
import org.springblade.demo2.service.BlogService;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@AllArgsConstructor
public class BlogClientImpl implements BlogClient {

	private BlogService blogService;
	@Override
	@GetMapping(APP_PREFIX+"/detail")
	public R<Blog> detail(Integer id) {
		int cnt=200/0;
		return R.data(blogService.getById(id));
	}
}
